package com.yxym.final_;

public class FinalExercise01 {
    public static void main(String[] args) {
        circle circle = new circle(3.1);
        System.out.println("面积=" + circle.S());
    }
}
class circle{
    private double radius;
    private final  double PI = 3.14;

    public circle(double radius) {
        this.radius = radius;
    }
    public  double S(){
        return  radius * radius * PI;
    }
    public class Something{
        public int addOne(final int x){
            //++x;不能修改final定义的局部变量
            return x + 1;//正确
        }
    }
}
